#!/bin/sh

# Copyright (C) 2015-2021, Wazuh Inc.
# OSSEC         Controls Wazuh
# Author:       Daniel B. Cid <dcid@ossec.net>
# Modified for slackware by Jack S. Lai

WAZUH_HOME=WAZUH_HOME_TMP
WAZUH_CONTROL="$WAZUH_HOME/bin/wazuh-control"

start() {
    ${WAZUH_CONTROL} start
}

stop() {
    ${WAZUH_CONTROL} stop
}

status() {
    ${WAZUH_CONTROL} status
}

case "$1" in
start)
    start
    ;;
stop)
    stop
    ;;
restart)
    stop
    start
    ;;
status)
    status
    ;;
*)
    echo "*** Usage: $0 {start|stop|restart|status}"
    exit 1
esac

exit 0
